package BasicKnowledge;

public class overLoad {
    public static int max(int n1, int n2) {
        return n1 > n2 ? n1 : n2;
    }
    public static int max(int n1, int n2, int n3) {
        int ret = n1 > n2 ? n1 : n2;
        return ret > n3 ? ret : n3;
    }
    public static void main1(String[] args) {
        System.out.println(max(5, 9));
        System.out.println(max(9, 6, 5));
    }

    public static int sum(int n1 , int n2) {
        return n1 + n2;
    }
    public static double sum(double n1, double n2) {
        return n1 + n2;
    }
    public static void main(String[] args) {
        System.out.println(sum(6, 9));
        System.out.println(sum(3.1, 6.3));
    }
}
